<template>
    <div class="twoMax" ref="twoMax">
        <publiMin :title="'人气推荐'" :biao="'新鲜出炉 不容从国'">
            <template v-slot:qq>
                <div class="eeeeeee">
                    <div class="public_di_bao" v-for="item in ju" :key="item.id">
                        <div class="public_di_temp">
                            <img :src="item.picture" alt="">
                            <div class="public_di_wenn">
                                <p>{{ item.title }}</p>
                                <p>{{ item.alt }}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </template>
        </publiMin>
    </div>
</template>
<script>
import {gethot} from "@/utils/api/homeapi"
import publiMin from "@/components/bottom/publiMin"
import { lazyload } from "@/utils/content"
export default {
    components: { publiMin },
    data(){
        return{
            ju:[]
        }
    },
    mounted() {
        // this.setGetnew()
        lazyload(this.$refs.twoMax,this.setGetnew)
    },
    methods: {
        async setGetnew() {
            let data = await gethot()
            this.ju = data.data.result
            // console.log(this.ju);
        }
    }
}
</script>
<style lang="scss">
.eeeeeee {
    width: 1200px;
    height: 426px;
    // background: green;
    display: flex;
    justify-content: space-between;
    // align-items: center;
    .public_di_bao {
        width: 295px;
        height: 406px;
        display: flex;
        justify-content: space-between;
        // align-items: center;

        .public_di_temp {
            width: 100%;
            height: 306px;

            img {
                width: 100%;
                height: 100%;
            }

            .public_di_wenn {
                width: 100%;
                height: 100px;
                display: flex;
                align-content: center;
                flex-wrap: wrap;
                // background: #f0f9f4;
                p {
                    height: 30%;
                    width: 306px;
                    font-size: 22px;
                    line-height: 50px;
                    text-align: center;
                    margin-bottom: 10px;
                }
                p:nth-child(2){
                    // color: red;
                    font-size: 22px;
                }
            }
        }


    }
    .public_di_bao:hover{
        box-shadow: 0 0 10px rgb(176, 156, 156);
        transform: translate(0,-3px);
    }
}
</style>